let rec bubble_sort list =
  let rec calcul list =
    match list with
	[] -> []
      | e1::[] -> e1::[] 
      | e1::e2::l when e1<=e2 -> e1::calcul (e2::l)
      | e1::e2::l -> e2 :: calcul (e1::l) in
  match list with
      [] -> []
    |e::l -> calcul(calcul l);;

let agenda = ["Xavière"; "Hugues"; "Aaro"; "Valentin"; "Rebecca"; "Xavier";
    "Dorothée";"Evrard"; "Philippe";"Zéphyrin"; "Véronique";"Nicolas";"Ivan";
    "Aymone";"Ségolène";"Camille";"Bruno";"Patricia";"Mélissa";"Jack";"Fabien";
    "Gwénola";"Olga";"Madeleine";"William";"Oswald";"Teddy";"Babette";"Sabrina";
    "Nastasia";"Zoé";"Cyrille";"Ursula";"Yann";"Ludovic";"Ulrich";"Fulbert";
    "Dahlia";"Rudy";"Gabin";"Edgar";"Peter";"Wolfgang";"Karin";"Théodore";
    "Yvan";"Kurt";"Pascal";"Ladislas";"Justine";"Harold"; "Igor"];;

bubble_sort agenda;;
